﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Kazuku.Core.Models;

namespace Kazuku.Core.Extensions {
	public static class HtmlHelperExtensions {
		public static void ContentArea(this HtmlHelper htmlHelper, string contentLocation, List<PartialRequest> contentModules) { 
			if (contentModules != null) {
				foreach (PartialRequest content in contentModules) {
					htmlHelper.RenderContent(content);
				}
			}
		}

		public static void RenderContent(this HtmlHelper html, PartialRequest content) {
			if (content != null) {
				content.Invoke(html.ViewContext);
			}
		}

	}
}